<!--
 * @Author: lujizhang
 * @Date: 2020-05-20 17:39:17
 * @LastEditors: lujizhang
 * @LastEditTime: 2020-11-12 18:20:48
 * @Descripttion: 
 * @version: 
-->
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/> 
    <title>微信授权成功</title>
    
	
</head>
<body>
    <br/>
    <div style="width:80%;text-align: center;margin:30px auto;border:solid 1px #eeeeee;border-radius: 5px;padding:2rem;">
        <a href="{$tourl}" id="aurl">正在跳转...请稍等！如果没有自动跳转请点击这里</a>
	</div>
	<div id="zfResutl" style="margin-top:50px;width:80%;text-align: center;margin:30px auto;border:solid 1px #eeeeee;border-radius: 5px;padding:2rem;">
	</div>
    <script src="/static/js/jquery-1.12.3.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="/static/js/js.cookie.min.js"></script>
    <script type="text/javascript">
    
    var wx_openid = '{$wx_openid}';
	var wx_app_id = '{$wx_app_id}';
	var cookie_key = '{$cookie_key}';
    var tourl = '{$tourl}';
    {literal}
    (function ($,w) {
        $(document).ready(function(){
            setUserCookie();
            location.href = tourl;
        })
    	
		//调用微信JS api 支付
		function setUserCookie()
		{
			Cookies.set(cookie_key,wx_openid,{expires:365});
            localStorage.setItem(cookie_key,wx_openid);
            sessionStorage.setItem(cookie_key,wx_openid);
           
        }

	})(jQuery,window)
	{/literal}
	</script>

</body>

</html>